home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / AIncludes / ASDebugging.a < prev    next >
Encoding:
Text File  |  1995-04-18  |  7.4 KB  |  306 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ASDebugging.a
  3. ;
  4. ;    Contains:    AppleScript Debugging Interfaces.
  5. ;
  6. ;    Version:    Technology:    AppleScript 1.1
  7. ;                Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__ASDEBUGGING__') = 'UNDEFINED' THEN
  21. __ASDEBUGGING__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  25.     include 'AppleEvents.a'
  26.     ENDIF
  27. ;        include 'Errors.a'                                            ;
  28. ;            include 'ConditionalMacros.a'                            ;
  29. ;        include 'Types.a'                                            ;
  30. ;        include 'Memory.a'                                            ;
  31. ;            include 'MixedMode.a'                                    ;
  32. ;        include 'OSUtils.a'                                        ;
  33. ;        include 'Events.a'                                            ;
  34. ;            include 'Quickdraw.a'                                    ;
  35. ;                include 'QuickdrawText.a'                            ;
  36. ;        include 'EPPC.a'                                            ;
  37. ;            include 'AppleTalk.a'                                    ;
  38. ;            include 'Files.a'                                        ;
  39. ;            include 'PPCToolbox.a'                                    ;
  40. ;            include 'Processes.a'                                    ;
  41. ;        include 'Notification.a'                                    ;
  42.  
  43.     IF &TYPE('__APPLESCRIPT__') = 'UNDEFINED' THEN
  44.     include 'AppleScript.a'
  45.     ENDIF
  46. ;        include 'OSA.a'                                            ;
  47. ;            include 'AEObjects.a'                                    ;
  48. ;            include 'Components.a'                                    ;
  49. ;        include 'TextEdit.a'                                        ;
  50.  
  51. ;     This mode flag can be passed to OSASetProperty or OSASetHandler
  52. ;        and will prevent properties or handlers from being defined in a context
  53. ;        that doesn't already have bindings for them. An error is returned if
  54. ;        a current binding doesn't already exist. 
  55. kOSAModeDontDefine                EQU        $0001
  56.  
  57. ;*************************************************************************
  58. ;    Component Selectors
  59. ;*************************************************************************
  60. kASSelectSetPropertyObsolete    EQU        $1101
  61. kASSelectGetPropertyObsolete    EQU        $1101
  62. kASSelectSetHandlerObsolete        EQU        $1103
  63. kASSelectGetHandlerObsolete        EQU        $1104
  64. kASSelectGetAppTerminologyObsolete EQU        $1105
  65. kASSelectSetProperty            EQU        $1106
  66. kASSelectGetProperty            EQU        $1107
  67. kASSelectSetHandler                EQU        $1108
  68. kASSelectGetHandler                EQU        $1109
  69. kASSelectGetAppTerminology        EQU        $110A
  70. kASSelectGetSysTerminology        EQU        $110B
  71. kASSelectGetPropertyNames        EQU        $110C
  72. kASSelectGetHandlerNames        EQU        $110D
  73.  
  74. ;*************************************************************************
  75. ;    Context Accessors
  76. ;*************************************************************************
  77. ;
  78. ; pascal OSAError OSASetProperty(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *variableName, OSAID scriptValueID)
  79. ;
  80.     IF ¬ GENERATINGCFM THEN
  81.         Macro
  82.         _OSASetProperty
  83.             dc.w     $2F3C
  84.             dc.w     $0010
  85.             dc.w     $1106
  86.             moveq    #0,d0
  87.             dc.w     $A82A
  88.         EndM
  89.     ELSE
  90.         IMPORT_CFM_FUNCTION    OSASetProperty
  91.     ENDIF
  92.  
  93. ;
  94. ; pascal OSAError OSAGetProperty(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *variableName, OSAID *resultingScriptValueID)
  95. ;
  96.     IF ¬ GENERATINGCFM THEN
  97.         Macro
  98.         _OSAGetProperty
  99.             dc.w     $2F3C
  100.             dc.w     $0010
  101.             dc.w     $1107
  102.             moveq    #0,d0
  103.             dc.w     $A82A
  104.         EndM
  105.     ELSE
  106.         IMPORT_CFM_FUNCTION    OSAGetProperty
  107.     ENDIF
  108.  
  109. ;
  110. ; pascal OSAError OSAGetPropertyNames(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, AEDescList *resultingPropertyNames)
  111. ;
  112.     IF ¬ GENERATINGCFM THEN
  113.         Macro
  114.         _OSAGetPropertyNames
  115.             dc.w     $2F3C
  116.             dc.w     $000C
  117.             dc.w     $110C
  118.             moveq    #0,d0
  119.             dc.w     $A82A
  120.         EndM
  121.     ELSE
  122.         IMPORT_CFM_FUNCTION    OSAGetPropertyNames
  123.     ENDIF
  124.  
  125. ;
  126. ; pascal OSAError OSASetHandler(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *handlerName, OSAID compiledScriptID)
  127. ;
  128.     IF ¬ GENERATINGCFM THEN
  129.         Macro
  130.         _OSASetHandler
  131.             dc.w     $2F3C
  132.             dc.w     $0010
  133.             dc.w     $1108
  134.             moveq    #0,d0
  135.             dc.w     $A82A
  136.         EndM
  137.     ELSE
  138.         IMPORT_CFM_FUNCTION    OSASetHandler
  139.     ENDIF
  140.  
  141. ;
  142. ; pascal OSAError OSAGetHandler(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *handlerName, OSAID *resultingCompiledScriptID)
  143. ;
  144.     IF ¬ GENERATINGCFM THEN
  145.         Macro
  146.         _OSAGetHandler
  147.             dc.w     $2F3C
  148.             dc.w     $0010
  149.             dc.w     $1109
  150.             moveq    #0,d0
  151.             dc.w     $A82A
  152.         EndM
  153.     ELSE
  154.         IMPORT_CFM_FUNCTION    OSAGetHandler
  155.     ENDIF
  156.  
  157. ;
  158. ; pascal OSAError OSAGetHandlerNames(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, AEDescList *resultingHandlerNames)
  159. ;
  160.     IF ¬ GENERATINGCFM THEN
  161.         Macro
  162.         _OSAGetHandlerNames
  163.             dc.w     $2F3C
  164.             dc.w     $000C
  165.             dc.w     $110D
  166.             moveq    #0,d0
  167.             dc.w     $A82A
  168.         EndM
  169.     ELSE
  170.         IMPORT_CFM_FUNCTION    OSAGetHandlerNames
  171.     ENDIF
  172.  
  173. ;
  174. ; pascal OSAError OSAGetAppTerminology(ComponentInstance scriptingComponent, long modeFlags, FSSpec *fileSpec, short terminologyID, Boolean *didLaunch, AEDesc *terminologyList)
  175. ;
  176.     IF ¬ GENERATINGCFM THEN
  177.         Macro
  178.         _OSAGetAppTerminology
  179.             dc.w     $2F3C
  180.             dc.w     $0012
  181.             dc.w     $110A
  182.             moveq    #0,d0
  183.             dc.w     $A82A
  184.         EndM
  185.     ELSE
  186.         IMPORT_CFM_FUNCTION    OSAGetAppTerminology
  187.     ENDIF
  188.  
  189. ; Errors:
  190. ;       errOSASystemError        operation failed
  191. ;    
  192. ;
  193. ; pascal OSAError OSAGetSysTerminology(ComponentInstance scriptingComponent, long modeFlags, short terminologyID, AEDesc *terminologyList)
  194. ;
  195.     IF ¬ GENERATINGCFM THEN
  196.         Macro
  197.         _OSAGetSysTerminology
  198.             dc.w     $2F3C
  199.             dc.w     $000A
  200.             dc.w     $110B
  201.             moveq    #0,d0
  202.             dc.w     $A82A
  203.         EndM
  204.     ELSE
  205.         IMPORT_CFM_FUNCTION    OSAGetSysTerminology
  206.     ENDIF
  207.  
  208. ; Errors:
  209. ;       errOSASystemError        operation failed
  210. ;    
  211. ; Notes on terminology ID
  212. ;
  213. ;    A terminology ID is derived from script code and language code
  214. ;    as follows;
  215. ;
  216. ;        terminologyID = ((scriptCode & 0x7F) << 8) | (langCode & 0xFF)
  217. ;
  218. ;*************************************************************************
  219. ;    Obsolete versions provided for backward compatibility:
  220. ;
  221. ;
  222. ; pascal OSAError ASSetProperty(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *variableName, OSAID scriptValueID)
  223. ;
  224.     IF ¬ GENERATINGCFM THEN
  225.         Macro
  226.         _ASSetProperty
  227.             dc.w     $2F3C
  228.             dc.w     $000C
  229.             dc.w     $1101
  230.             moveq    #0,d0
  231.             dc.w     $A82A
  232.         EndM
  233.     ELSE
  234.         IMPORT_CFM_FUNCTION    ASSetProperty
  235.     ENDIF
  236.  
  237. ;
  238. ; pascal OSAError ASGetProperty(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *variableName, OSAID *resultingScriptValueID)
  239. ;
  240.     IF ¬ GENERATINGCFM THEN
  241.         Macro
  242.         _ASGetProperty
  243.             dc.w     $2F3C
  244.             dc.w     $000C
  245.             dc.w     $1101
  246.             moveq    #0,d0
  247.             dc.w     $A82A
  248.         EndM
  249.     ELSE
  250.         IMPORT_CFM_FUNCTION    ASGetProperty
  251.     ENDIF
  252.  
  253. ;
  254. ; pascal OSAError ASSetHandler(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *handlerName, OSAID compiledScriptID)
  255. ;
  256.     IF ¬ GENERATINGCFM THEN
  257.         Macro
  258.         _ASSetHandler
  259.             dc.w     $2F3C
  260.             dc.w     $000C
  261.             dc.w     $1103
  262.             moveq    #0,d0
  263.             dc.w     $A82A
  264.         EndM
  265.     ELSE
  266.         IMPORT_CFM_FUNCTION    ASSetHandler
  267.     ENDIF
  268.  
  269. ;
  270. ; pascal OSAError ASGetHandler(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *handlerName, OSAID *resultingCompiledScriptID)
  271. ;
  272.     IF ¬ GENERATINGCFM THEN
  273.         Macro
  274.         _ASGetHandler
  275.             dc.w     $2F3C
  276.             dc.w     $000C
  277.             dc.w     $1104
  278.             moveq    #0,d0
  279.             dc.w     $A82A
  280.         EndM
  281.     ELSE
  282.         IMPORT_CFM_FUNCTION    ASGetHandler
  283.     ENDIF
  284.  
  285. ;
  286. ; pascal OSAError ASGetAppTerminology(ComponentInstance scriptingComponent, FSSpec *fileSpec, short terminologID, Boolean *didLaunch, AEDesc *terminologyList)
  287. ;
  288.     IF ¬ GENERATINGCFM THEN
  289.         Macro
  290.         _ASGetAppTerminology
  291.             dc.w     $2F3C
  292.             dc.w     $000E
  293.             dc.w     $1105
  294.             moveq    #0,d0
  295.             dc.w     $A82A
  296.         EndM
  297.     ELSE
  298.         IMPORT_CFM_FUNCTION    ASGetAppTerminology
  299.     ENDIF
  300.  
  301. ; Errors:
  302. ;        errOSASystemError        operation failed
  303. ;    
  304. ;************************************************************************
  305.     ENDIF ; __ASDEBUGGING__
  306.